﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
namespace TBlog.Web.Models
{
    public class Article : BaseEntity
    {
        public string Title { get; set; }
        public string Author { get; set; }
        public string Content { get; set; }
        public int State { get; set; }
        /// <summary>
        /// 摘要
        ///// </summary>
        //public string Abstract { get; set; }
        public string Tags { get; set; }
        public int Hits { get; set; }
        public int CategoryID { get; set; }
        [JsonIgnore]
        public virtual Category Category { get; set; }
        public ICollection<Comment> _comment;
        //[JsonIgnore]
        public virtual ICollection<Comment> Comments
        {
            get
            {
                return _comment ?? (_comment = new List<Comment>());
            }

            protected set { _comment = value; }
        }
    }
}